package com.member.shop.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单对象 sys_biz_order
 *
 * @author lixinchen
 * @date 2024-01-08
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_order")
public class SysBizOrderExportVo extends BaseEntity {

    private static final long serialVersionUID = 1L;



    @TableField(exist = false)
    @Excel(name = "站点")
    private String tenantName;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderCode;

    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderAddTime;


    /**
     * 订单状态 10 待付款 20 待发货  30 待收货 40 待评价 50 交易完成 60 已取消
     */
    private Integer status;

    /**
     * 订单状态 10 待付款 20 待发货  30 待收货 40 待评价 50 交易完成 60 已取消
     */
    @Excel(name = "订单状态")
    private String statusName;



    @Excel(name = "店铺名称")
    @TableField(exist = false)
    private String shopName;

    /**
     * 下单人
     */
    private String userName;


    /**
     * 下单人手机号
     */
    @Excel(name = "下单人手机号")
    private String phone;
    /**
     * 订单金额
     */
    private BigDecimal amount;


    /**
     * 应付金额
     */
    @Excel(name = "订单金额")
    private BigDecimal payableAmount;

    /**
     * 优惠券金额
     */
    @Excel(name = "优惠券金额")
    private BigDecimal couponPrice;
    /**
     * 分账金支付金额
     */
    private BigDecimal balanceDiscountAmount;


    /**
     * 实付金额
     */
    @Excel(name = "实付金额")
    private BigDecimal fuyouDiscountAmount;


    /**
     * 余额金额
     */
    private BigDecimal surplusAmount;



    /**
     * 支付方式(0.纯富友券、1.纯余额、2.富友支付+余额支付)
     */
    private Integer paymentType;

    /**
     * 支付方式(0.纯富友券、1.纯余额、2.富友支付+余额支付)
     */
    @Excel(name = "支付方式")
    private String paymentTypeName;
    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;
    /**
     * 支付流水号
     */
    private String paymentNo;

    /**
     * 支付流水号
     */
    private String paymentId;

    /**
     * 下单备注
     */
    private String remark;
    /**
     * 收货人
     */
    @Excel(name = "收货人")
    private String receiver;

    /**
     * 收货人手机号
     */
    @Excel(name = "收货人手机号")
    private String contactNumber;
    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    private String receiverAddress;


    @Excel(name = "优惠券名称")
    private String couponName;


    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryGoodsTime;
    /**
     * 收货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date receiverGoodsTime;

    /**
     * 快递公司
     */
    @TableField(fill = FieldFill.UPDATE)
    private String expressCompany;

    /**
     * 快递单号
     */
    @TableField(fill = FieldFill.UPDATE)
    private String expressNo;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String goodsName;

    /**
     * 规格
     */
    @Excel(name = "规格")
    private String specsKey;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private BigDecimal unitPrice;


    /**
     * 数量
     */
    @Excel(name = "数量")
    private Long number;


    /**
     * 小计
     */
    private BigDecimal totalPrice;

    /**
     * 运费
     */
    @TableField(exist = false)
    private String freight;

    private String province;

    private String city;

    private String area;

    private Long userCouponId;


    @Excel(name = "销售经理名称")
    @TableField(exist = false)
    private String salesName;

    @Excel(name = "销售经理手机号")
    @TableField(exist = false)
    private String salesPhone;

    @Excel(name = "一级分类")
    @TableField(exist = false)
    private String categoryName1;

    @Excel(name = "二级分类")
    @TableField(exist = false)
    private String categoryName2;

}
